﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YouthCMS.Data;

namespace YouthCMS
{
    public partial class Admin : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Username"] == null)
            {
                Response.Redirect("Default.aspx?login=false");
            }
        }

        public void CreateTest(object sender, EventArgs e)
        {
            //var list2 = new List<Person>();
            //list2.Add(new Person() { FirstName = "Jens", LastName = "Jensen", Address1 = "sdsd", Address2 = "cvcv", City = "Slagelse", Email = "dfdfd", Mobile = 22112233, UserName = "JenJen1234", PassWord = "1234", Active = true });
            //list2.Add(new Person() { FirstName = "Ole", LastName = "Olsen", Address1 = "gfg", Address2 = "asas", City = "Korsoer", Email = "cvcv", Mobile = 22112233, UserName = "", PassWord = "", Active = true });
            //list2.Add(new Teacher() {Initials = "jje",WorkPhone = 11223344, AddressProtection = false, PhoneProtection = true, FirstName = "Jens", LastName = "Jensen", Address1 = "sdsd", Address2 = "cvcv", City = "Slagelse", Email = "dfdfd", Mobile = 22112233, UserName = "JenJen1234", PassWord = "1234", Active = true });
            ////list2.Add(new Person() { FirstName = "", LastName = "", Address1 = "", Address2 = "", City = "", Email = "", Mobile = 22112233, UserName = "", PassWord = "", Active = false });

            //var database = new Database();
            //database.CreateNewTeacher(new Teacher(){SSN = "112233-1122", Initials = "jje",WorkPhone = 11223344, AddressProtection = false, PhoneProtection = true, FirstName = "Jens", LastName = "Jensen", Address1 = "sdsd", Address2 = "cvcv", City = "Slagelse", Email = "dfdfd", Mobile = 22112233, UserName = "JenJen1234", PassWord = "1234", Active = true } );

        }
    }
}